class ApplicationController < ActionController::Base

  include AuthenticatedSystem
  before_filter :app_config, :login_from_cookie, :set_locale

  def set_locale(lang = nil)
    Localization.lang = lang || @app[:lang]
  end
  
  
  def in_domain? *domains
    @current_friend ? @current_friend.in_domain?(domains) : false
  end
  
  helper_method :app_config, :in_domain?

  def h
    Helpy.instance
  end

end
